#!/usr/bin/env python
# -*- coding: utf-8 -*-

import pymysql
import time

if __name__ == '__main__':
    for i in range(10):
        try:
            m = pymysql.connect(host="localhost", 
                                port=23306,
                                user="syuee",
                                passwd="123456",
                                db="syuee",
                                charset="utf8")
        except Exception as e:
            print('Exception:\t',str(e))
            time.sleep(1)
            continue
    raise e
            
